package com.yufubao.model.dto.applet.search;

import lombok.Data;

@Data
public class SearchDto {
    private String searchWords;
    private int pageNum;
    private int pageSize;

    public int getFromIndex() {
        if (pageNum < 1) return 0;
        if (pageSize < 1) pageSize = 10;
        return pageSize * (pageNum - 1);
    }
}
